package yingyong;

import my_stream.ArraryList;

import java.util.ArrayList;
import java.util.Collections;
import java.util.function.Function;

public class demo2 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"aaa", "bbb", "ccc", "ddd");

        list.stream().map(new Function<String, String>() {
            public String apply(String s){
                String str = s.toUpperCase();
                return str;
            }
        }).forEach(s -> System.out.println(s));
    }
}
